﻿using huqiang.Communication;
using System;
using System.Collections.Generic;
using System.Text;
using UnityEngine;

namespace DataHandle
{
    public class MessageType
    {
        public const byte Def = 0;
        public const byte Rpc = 1;
        public const byte Query = 2;
        public const byte Game = 3;
    }
    public class DataProc
    {
        public static void HandleMsg(KcpLink link, byte dataType,  byte cmdType, int cmd, string str)
        {
            switch (dataType)
            {
                case EnvelopeType.Json:
                    JsonDataHandle.Handle(link, cmdType, cmd, str);
                    break;
                case EnvelopeType.String:
                    StringDataHnadle.Handle(link, cmdType, cmd, str);
                    break;
            }
        }
        public static void HandleMsg(KcpLink link, byte dataType, byte cmdType, int cmd, byte[] dat)
        {

        }
        public static void HandleError(KcpLink link, byte dataType, byte cmdType, int error, string tip)
        {

        }
    }
}

